//
//  AuthorizeResult.swift
//  uwantgoeasy
//
//  Created by 冯传宝 on 12/11/15.
//  Copyright © 2015 uwantsoft. All rights reserved.
//

import Foundation
class AuthorizeResult: ServerMessage {
    private var sid: String=""
    private var enableSubscribe: Bool=false
    private var enablePublish: Bool=false
    private var resultCode:UInt=0
    
    override init(){
        
    }
    convenience init(json:NSMutableDictionary){
        self.init()
        self.sid=json["sid"] as! String
        self.enableSubscribe=json["enableSubscribe"] as! Bool
        self.enablePublish=json["enablePublish"] as! Bool
        self.resultCode=json["resultCode"] as! UInt
    }
    
    override func typeCode() -> UInt {
        return 1
    }

    var _resultCode:UInt{
        get{
            return resultCode
        }
        set(newVal){
            resultCode = newVal
        }
    }
    var _sid:String{
        get{
            return sid
        }
    }
    var _enableSubscribe:Bool{
        get{
            return enableSubscribe
        }
    }
    var _enablePublish:Bool{
        get{
            return enablePublish
        }
    }
}